//
//  RootViewController.m
//  IceBreaker
//
//  Created by Chiao Wolfire on 12-9-27.
//  Copyright (c) 2012年 NDS. All rights reserved.
//

#import "RootViewController.h"
#import "LoginViewController.h"

@implementation RootViewController


-(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
    }
    return self;
}

-(void)viewDidLoad {
    [super viewDidLoad];
    [[UIApplication sharedApplication] setStatusBarHidden: YES withAnimation: UIStatusBarAnimationSlide];
    UIImage *backImag = [UIImage imageNamed: @"backgroud.png"];

    self.view.backgroundColor = [UIColor colorWithPatternImage: backImag];
    // Do any additional setup after loading the view from its nib.
}

-(void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
 
-(void) viewDidAppear:(BOOL)animated {
    [self performSelector: @selector(automaticViewJump:)
               withObject: nil
               afterDelay: 0.1];
}

-(IBAction) automaticViewJump:(id)sender {
    LoginViewController *nxtView = [[LoginViewController alloc] initWithNibName: @"LoginViewController"
                                                                         bundle: nil];
    [self presentModalViewController: nxtView
                            animated: YES];
}

@end
